package Login;

import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

public class Button{
	private BufferedImage imgCur, img1, img2, img3;
	private int n;
	public Button(String f1, String f2, String f3){
		
		try{
		 img1 = ImageIO.read(new File(f1));
		 img2 = ImageIO.read(new File(f2));
		 img3 = ImageIO.read(new File(f3));
			
		}catch(IOException e){
			System.out.print("Image not found");
			e.printStackTrace();
			
		}
		imgCur=img1;
		n=0;
	}
	
	
	public Dimension getSize(){
		return new Dimension(img1.getWidth(), img2.getHeight());
	}
	public int getCurImgIndex(){
		return n;
	}
	public void setCurImg(int n){
		this.n=n;
		if (n==0)
			imgCur=img1;
		if (n==1)
			imgCur=img2;
		if (n==2)
			imgCur=img3;
		
	}

	public BufferedImage getCurImg(){
		return imgCur;
	}
	
}
